package com.petAdoption.manager.util;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.function.Predicate;

@Component
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Page<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    //总数
    //当前页码
    //页容
    //下一页   判断不超过最后一页
    //上一页   判断不小于0
    //查询过后存储结果集

    protected int pageNum;
    protected int total;
    protected int pageSize;
    protected int current;
    protected List<T> records;


//    int PageNum =  (total +pageSize - 1) / pageSize;
//    int PageSize = (int) ((PageNum-1)*pageSize);

    }
